var endDate = new Date("Fri Aug 31 00:00:00 2012");
var today = new Date();
// Calculate the number of days in the difference.
var hourDiff = (endDate - today) / (1000 * 60 * 60);
if (hourDiff > 24) {
	$("#header-round-countdown").countdown({
		until : endDate,
		tickInterval : 60,
		layout : '(ends in {dn} {dl}, {hn} {hl}, and {mn} {ml})'
	});
} else {
	if (hourDiff < 6) {
		$("#header-round-info").addClass("ending");
	}
	$("#header-round-countdown").countdown({
		until : endDate,
		layout : '(ends in {hn} {hl}, {mn} {ml}, and {sn} {sl})'
	});
}